import cv2
import numpy as np

img = cv2.imread('C:\\Users\\Mengyang\\Desktop\\112.png')

new = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE) #顺时针旋转90度
new1 = cv2.rotate(img, cv2.ROTATE_180) #旋转180度
new2 = cv2.rotate(img, cv2.ROTATE_90_COUNTERCLOCKWISE) #旋转270度  逆时针90度

cv2.imshow('img',img)
cv2.imshow('new',new)
cv2.imshow('new1',new1)
cv2.imshow('new2',new2)

cv2.waitKey(0)

